<?php /* Smarty version Smarty-3.1.15, created on 2017-08-01 22:08:53
         compiled from "D:\www\osadmin\uploads\include\template\panel\machine_add.tpl" */ ?>
<?php /*%%SmartyHeaderCode:3226558144a196e11a2-99041785%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '2c64b49fd723ec8d2f48abdf42e9e6c7773d8a0c' => 
    array (
      0 => 'D:\\www\\osadmin\\uploads\\include\\template\\panel\\machine_add.tpl',
      1 => 1501596529,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '3226558144a196e11a2-99041785',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.15',
  'unifunc' => 'content_58144a19715287_69941023',
  'variables' => 
  array (
    'osadmin_action_alert' => 0,
    'osadmin_quick_note' => 0,
    '_POST' => 0,
    'machine_id' => 0,
    'method' => 0,
    'machineRemark' => 0,
    'value' => 0,
    'machineVistor' => 0,
    'machineConsumables' => 0,
    'machineConsumablesRemark' => 0,
    'machineAccessoriesRemark' => 0,
    'machineMachineContract' => 0,
    'machineMachineContractRemark' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_58144a19715287_69941023')) {function content_58144a19715287_69941023($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<?php echo $_smarty_tpl->getSubTemplate ("navibar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<?php echo $_smarty_tpl->getSubTemplate ("sidebar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>

<!-- START 以上内容不需更改，保证该TPL页内的标签匹配即可 -->

<?php echo $_smarty_tpl->tpl_vars['osadmin_action_alert']->value;?>

<?php echo $_smarty_tpl->tpl_vars['osadmin_quick_note']->value;?>

<form id="tab" method="post" action="" class="add-machine">   
<div class="well">
    <ul class="nav nav-tabs">
      <li class="active"><a href="#home" data-toggle="tab">请填写主机信息</a></li>
    </ul>	
	<div id="myTabContent" class="tab-content">
		  <div class="tab-pane active in" id="home">
           
				<div class="controls controls-row form-inline">
				    <label class="control-label">客户编号</label>
					<input  type="text" placeholder="请输入主机序列号" name="custom_code" value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['custom_code'];?>
" required="true" autofocus="true">
					<label class="control-label">主机序列号</label>
					<input  type="text" placeholder="请输入主机序列号" name="serial_number" value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['serial_number'];?>
" required="true" autofocus="true">
  					<label for="inputgsmc" class="col-sm-2 control-label">主机型号</label>
  					<input  type="text" placeholder="请输入主机货号" name="host_number" value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['host_number'];?>
" required="true" autofocus="true">
					<label for="inputgsmc" class="col-sm-2 control-label">装机日期</label>
					<input type="text" id="installed_date" placeholder="请输入装机日期" name="installed_date" value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['installed_date'];?>
"  required="true" autofocus="true" >
				</div>
				<div class="controls controls-row form-inline">
  					<label for="inputgsmc" class="col-sm-2 control-label">进水水质</label>
  					<input  type="text" placeholder="请输入进水水质" name="inlet_water_quality" value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['inlet_water_quality'];?>
" >
					<label for="inputgsmc" class="col-sm-2 control-label">预处理</label>
					<input type="text"  placeholder="请输入预处理"  name="pretreatment" value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['pretreatment'];?>
"   >
					<label class="control-label">水箱</label>
					<input  type="text" placeholder="请输入水箱" name="water_tank" value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['water_tank'];?>
" >
				</div>
				<div class="controls controls-row form-inline">
					<label class="control-label">合同号</label>
					<input  type="text" placeholder="请输入发合同号" name="contract_number"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['contract_number'];?>
" >
					<label for="inputgsmc" class="col-sm-2 control-label">工程师</label>
					<input type="text"  placeholder="请输入工程师"  name="engineer" value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['engineer'];?>
"   >
					<label for="inputgsmc" class="col-sm-2 control-label">停机日期</label>
  					<input  type="text" placeholder="请输入停机日期" name="stop_date"  id="stop_date" value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['stop_date'];?>
" >
				</div>
				<div class="controls controls-row form-inline">
					<label class="control-label">主机描述</label>
					<input  type="text" placeholder="请输入主机描述" name="host_description"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['host_description'];?>
" >
					<label class="control-label">销售</label>
					<input  type="text" placeholder="请输入销售" name="sale_user"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['sale_user'];?>
" >
  					<label for="inputgsmc" class="col-sm-2 control-label">更新日期</label>
					<input type="text"  placeholder="请输入报废日期"  name="update_time" id="update_time" value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['update_time'];?>
"   >
				</div>
				<div class="controls controls-row form-inline">
					<label class="control-label">品牌</label>
					<input  type="text" placeholder="请输入品牌" name="brand"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['brand'];?>
" >
				</div>
				<div class="controls controls-row form-inline">
					<label>主机描述</label>
					<textarea name="group_desc" rows="3" cols="20" class="input-xlarge"><?php echo $_smarty_tpl->tpl_vars['_POST']->value['group_desc'];?>
</textarea>
				</div>
		
        </div>
    </div>
    <!-- 客户装机信息设置 -->
    <ul class="nav nav-tabs customer-nav">
      <li class="active"><a href="#home" data-toggle="tab">客户装机信息</a></li>
    </ul>
    <div class="tab-pane active in">
    	<div class="controls controls-row form-inline">
			<label class="control-label">销售类型</label>
			<input checked type="radio" name="sales_type"  value="1" <?php echo $_smarty_tpl->tpl_vars['_POST']->value['check_1'];?>
  >直销
			<input type="radio" name="sales_type"  value="2" <?php echo $_smarty_tpl->tpl_vars['_POST']->value['check_2'];?>
 >经销
			<label class="control-label">经销商</label>
			<input  type="text" placeholder="请输入经销商" name="distributor"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['distributor'];?>
" required="true" autofocus="true" >
			<label class="control-label">主机状态</label>
			<input  type="text" placeholder="请输入主机状态" name="host_state"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['host_state'];?>
"  autofocus="true">
		</div>
		<div class="controls controls-row form-inline">
			<label class="control-label">客户名称</label>
			<input  type="text" placeholder="请输入客户名称" name="customer_name"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['customer_name'];?>
" >
			<label class="control-label">联系人</label>
			<input  type="text" placeholder="请输入联系人" name="contacts_user"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['contacts_user'];?>
" >
			<label class="control-label">电话</label>
			<input  type="text" placeholder="请输入电话" name="tel"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['tel'];?>
" >
		</div>
    </div>
    <!-- 终端客户设置 -->
    <ul class="nav nav-tabs customer-nav">
      <li class="active"><a href="#home" data-toggle="tab">终端客户信息</a></li>
    </ul>
    
    <div class="tab-pane active in">
    	<div class="controls controls-row form-inline">
			<label class="control-label">终端客户</label>
			<input  type="text" placeholder="请输入终端客户" name="terminal_client"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['terminal_client'];?>
" required="true" autofocus="true" >
			<label class="control-label">二级客户</label>
			<input  type="text" placeholder="请输入二级客户" name="two_customer"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['two_customer'];?>
"  >
			<label class="control-label">三级客户</label>
			<input  type="text" placeholder="请输入三级客户" name="three_customer"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['three_customer'];?>
">
		</div>
		<div class="controls controls-row form-inline">
			<label class="control-label">行业类别</label>
			<select name="industry_categories">
			   <option value="1">政府</ption>
			   <option value="2">高校</ption>
			   <option value="3">事业单位</ption>
			   <option value="4">研究所</ption>
			   <option value="5">医院</ption>
			   <option value="6">第三方</ption>
			   <option value="7">制药</ption>
			   <option value="8">电力</ption>
			   <option value="9">电子</ption>
			   <option value="10">化工</ption>
			   <option value="11">其他工业</ption>
			</select>
			<label class="control-label">单位地址</label>
			<input  type="text" placeholder="请输入单位地址" name="unit_address"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['unit_address'];?>
" >
			<label class="control-label">装机地址</label>
			<input  type="text" placeholder="请输入装机地址" name="installed_address"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['installed_address'];?>
" >
		</div>
		<div class="controls controls-row form-inline">
			<label class="control-label">邮编</label>
			<input  type="text" placeholder="请输入邮编" name="zip_code"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['zip_code'];?>
" >
			<label class="control-label">区域</label>
			<input  type="text" placeholder="请输入单区域" name="region"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['region'];?>
" >
		</div>
		<div class="controls controls-row form-inline">
			<label class="control-label">联系人</label>
			<input  type="text" placeholder="请输入联系人" name="contacts_1"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['contacts_1'];?>
"  class="input-small">
			<label class="control-label">电话</label>
			<input  type="text" placeholder="请输入电话" name="tel_1"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['tel_1'];?>
" class="input-small" >
			<label class="control-label">手机</label>
			<input  type="text" placeholder="请输入手机" name="phone_1"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['phone_1'];?>
"  class="input-small">
			<label class="control-label">Email</label>
			<input  type="text" placeholder="请输入Email" name="email_1"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['email_1'];?>
" class="input-small">
			<label class="control-label">传真</label>
			<input  type="text" placeholder="请输入传真" name="fax_1"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['fax_1'];?>
" class="input-small">
		</div>
		<div class="controls controls-row form-inline">
			<label class="control-label">使用者</label>
			<input  type="text" placeholder="请输入联系人" name="contacts_2"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['contacts_2'];?>
"  class="input-small">
			<label class="control-label">电话</label>
			<input  type="text" placeholder="请输入电话" name="tel_2"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['tel_2'];?>
" class="input-small" >
			<label class="control-label">手机</label>
			<input  type="text" placeholder="请输入手机" name="phone_2"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['phone_2'];?>
"  class="input-small">
			<label class="control-label">Email</label>
			<input  type="text" placeholder="请输入Email" name="email_2"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['email_2'];?>
" class="input-small">
			<label class="control-label">传真</label>
			<input  type="text" placeholder="请输入传真" name="fax_2"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['fax_2'];?>
" class="input-small">
		</div>
		<div class="controls controls-row form-inline">
			<label class="control-label">主管</label>
			<input  type="text" placeholder="请输入联系人" name="contacts_3"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['contacts_3'];?>
"  class="input-small">
			<label class="control-label">电话</label>
			<input  type="text" placeholder="请输入电话" name="tel_3"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['tel_3'];?>
" class="input-small" >
			<label class="control-label">手机</label>
			<input  type="text" placeholder="请输入手机" name="phone_3"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['phone_3'];?>
"  class="input-small">
			<label class="control-label">Email</label>
			<input  type="text" placeholder="请输入Email" name="email_3"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['email_3'];?>
" class="input-small">
			<label class="control-label">传真</label>
			<input  type="text" placeholder="请输入传真" name="fax_3"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['fax_3'];?>
" class="input-small">
		</div>
		<div class="controls controls-row form-inline">
			<label class="control-label">采购</label>
			<input  type="text" placeholder="请输入联系人" name="contacts_4"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['contacts_4'];?>
"  class="input-small">
			<label class="control-label">电话</label>
			<input  type="text" placeholder="请输入电话" name="tel_4"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['tel_4'];?>
" class="input-small" >
			<label class="control-label">手机</label>
			<input  type="text" placeholder="请输入手机" name="phone_4"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['phone_4'];?>
"  class="input-small">
			<label class="control-label">Email</label>
			<input  type="text" placeholder="请输入Email" name="email_4"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['email_4'];?>
" class="input-small">
			<label class="control-label">传真</label>
			<input  type="text" placeholder="请输入传真" name="fax_4"  value="<?php echo $_smarty_tpl->tpl_vars['_POST']->value['fax_4'];?>
" class="input-small">
		</div>
    </div>
    <input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['machine_id']->value;?>
" name="machine_id">
    <div class="btn-toolbar form-inline">
		 <button type="submit" class="btn btn-primary"><strong>提交</strong></button>
	</div>
	<hr style="width:100%;background-color:#ddd;height:1px" />
	<?php if ($_smarty_tpl->tpl_vars['method']->value=="modify") {?>
	<!-- 主机备注 -->
    <ul class="nav nav-tabs customer-nav">
      <li class="active"><a href="#home" data-toggle="tab">主机备注</a></li>
    </ul>
    <a href="javascript:;" class="add-machine-reamrk" data-target="#MachineModal">添加</a>
    <div class="tab-pane active in">
       <table class="table table-hover table-bordered"> 
        <tr>
        	<td>备注内容</td>
        	<td>备注时间</td>
        </tr>
        <?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['machineRemark']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
$_smarty_tpl->tpl_vars['value']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['value']->key;
?>
    	<tr>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['remark'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['create_time'];?>
</td>
         </tr>
		<?php } ?>
		</table>
    </div>
    <!-- 拜访记录  -->
    <ul class="nav nav-tabs customer-nav">
      <li class="active"><a href="#home" data-toggle="tab">拜访记录</a></li>
    </ul>
    <a href="javascript:;" type="button" class="add-visit-record" data-toggle="modal" data-target="#addvisitModal" >添加拜访记录</a>
     <div class="tab-pane active in">
       <table class="table table-hover table-bordered"> 
        <tr>
        	<td>拜访者</td>
        	<td>上门类别</td>
        	<td>拜访日期</td>
        	<td>主机备注</td>
        </tr>
        <?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['machineVistor']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
$_smarty_tpl->tpl_vars['value']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['value']->key;
?>
    	<tr>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['visitor_user_name'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['visitor_service_type'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['visitor_time'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['visitor_remark'];?>
</td>
         </tr>
		<?php } ?>
		</table>
    </div>
    <!-- 耗材使用记录  -->
    <ul class="nav nav-tabs customer-nav">
      <li class="active"><a href="#home" data-toggle="tab">耗材使用记录</a></li>
    </ul>
    <a href="javascript:;" type="button" class="consumables-usage-record" data-toggle="modal" data-target="#addconsumablesUsageModal" >耗材使用记录 </a>
     <div class="tab-pane active in">
       <table class="table table-hover table-bordered"> 
        <tr>
        	<td>耗材货号</td>
        	<td>描述</td>
        	<td>市场价(RMB)</td>
        	<td>成单金额(RMB)</td>
        	<td>折扣</td>
        	<td>开始日期</td>
        	<td>使用天数</td>
        	<td>到期日期</td>
        	<td>合同号</td>
        </tr>
        <?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['machineConsumables']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
$_smarty_tpl->tpl_vars['value']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['value']->key;
?>
    	<tr>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['consumable_item'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['usage_remark'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['market_value'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['single_amount'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['discount'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['beg_time'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['use_days'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['end_time'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['contract_number'];?>
</td>
         </tr>
		<?php } ?>
		</table>
    </div>
    
    <!-- 耗材使用备注  -->
    <ul class="nav nav-tabs customer-nav">
      <li class="active"><a href="#home" data-toggle="tab">耗材使用备注</a></li>
    </ul>
    <a href="javascript:;" type="button" class="consumables-usage-record" data-toggle="modal" data-target="#addconsumablesRemarkModal" >添加耗材使用备注 </a>
     <div class="tab-pane active in">
       <table class="table table-hover table-bordered"> 
        <tr>
        	<td>耗材使用备注内容</td>
        	<td>备注时间</td>
        </tr>
        <?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['machineConsumablesRemark']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
$_smarty_tpl->tpl_vars['value']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['value']->key;
?>
    	<tr>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['remark'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['create_time'];?>
</td>
         </tr>
		<?php } ?>
		</table>
    </div>
    
    <!-- 配件使用备注  -->
    <ul class="nav nav-tabs customer-nav">
      <li class="active"><a href="#home" data-toggle="tab">配件使用备注</a></li>
    </ul>
    <a href="javascript:;" type="button" class="consumables-usage-record" data-toggle="modal" data-target="#addaccessoriesRemarkModal" >添加配件使用备注 </a>
     <div class="tab-pane active in">
       <table class="table table-hover table-bordered"> 
        <tr>
        	<td>配件使用备注内容</td>
        	<td>备注时间</td>
        </tr>
        <?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['machineAccessoriesRemark']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
$_smarty_tpl->tpl_vars['value']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['value']->key;
?>
    	<tr>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['remark'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['create_time'];?>
</td>
         </tr>
		<?php } ?>
		</table>
    </div>
    
    <!-- 服务合同记录  -->
    <ul class="nav nav-tabs customer-nav">
      <li class="active"><a href="#home" data-toggle="tab">服务合同记录</a></li>
    </ul>
    <a href="javascript:;" type="button" class="consumables-usage-record" data-toggle="modal" data-target="#addContractModal" >服务合同记录 </a>
     <div class="tab-pane active in">
       <table class="table table-hover table-bordered"> 
        <tr>
        	<td>服务合同货号</td>
        	<td>合同类型</td>
        	<td>成单金额(RMB)</td>
        	<td>合同号</td>
        	<td>开始日期</td>
        	<td>到期日期</td>
        </tr>
        <?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['machineMachineContract']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
$_smarty_tpl->tpl_vars['value']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['value']->key;
?>
    	<tr>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['service_contract_number'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['contract_type'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['single_amount'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['contract_number'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['beg_time'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['end_time'];?>
</td>
         </tr>
		<?php } ?>
		</table>
    </div>
    
    <!-- 服务合同备注  -->
    <ul class="nav nav-tabs customer-nav">
      <li class="active"><a href="#home" data-toggle="tab">服务合同备注</a></li>
    </ul>
    <a href="javascript:;" type="button" class="consumables-usage-record" data-toggle="modal" data-target="#addContractReamrkModal" >服务合同备注 </a>
     <div class="tab-pane active in">
       <table class="table table-hover table-bordered"> 
        <tr>
        	<td>服务合同备注内容</td>
        	<td>备注时间</td>
        </tr>
        <?php  $_smarty_tpl->tpl_vars['value'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['value']->_loop = false;
 $_smarty_tpl->tpl_vars['k'] = new Smarty_Variable;
 $_from = $_smarty_tpl->tpl_vars['machineMachineContractRemark']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['value']->key => $_smarty_tpl->tpl_vars['value']->value) {
$_smarty_tpl->tpl_vars['value']->_loop = true;
 $_smarty_tpl->tpl_vars['k']->value = $_smarty_tpl->tpl_vars['value']->key;
?>
    	<tr>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['remark'];?>
</td>
        	<td><?php echo $_smarty_tpl->tpl_vars['value']->value['create_time'];?>
</td>
         </tr>
		<?php } ?>
		</table>
    </div>
    <?php }?>
</div>
</form>

<!-- 添加主机备注弹框 -->

<div class="modal fade" id="MachineModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <form id="add_machine_remark_tab" method="post" action="machine_add_remark.php" class="add-machine">
  <div class="modal-dialog" role="document">
   <div class="modal-content">
    <div class="modal-header">
     <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
     <h4 class="modal-title" id="MachineModalLabel">新增</h4>
    </div>
    <div class="modal-body">
	     <div class="controls controls-row form-inline">
				<label>主机备注</label>
				<textarea name="remark" rows="5" cols="30" class="input-xlarge"></textarea>
		 </div>
    </div>
     <input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['machine_id']->value;?>
" name="machine_id">
    <div class="modal-footer">
     <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>关闭</button>
     <button type="button" id="btn_submit_machine" class="btn btn-primary" data-dismiss="modal"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>保存</button>
    </div>
   </div>
  </div>
  </form>
 </div>


<!-- 添加拜访记录弹框模态框（Modal） -->
<form id="add_machine_visitor_tab" method="post" action="machine_add_visitor.php" class="add-visitor">
<div class="modal fade" id="addvisitModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title" id="myModalLabel"> 拜访记录</h4>
            </div>
            <div class="modal-body">
		         <div class="controls controls-row form-inline">
					<label class="control-label">拜访者:</label>
					<input  type="text" placeholder="拜访者" name="visitor_user_name"  value=""  required="true">
				</div>
				<div class="controls controls-row form-inline">		
					<label class="control-label">上门类别:</label>
					<select name="visitor_service_type">
					   <option value="1">1</option>
					   <option value="2">2</option>
					   <option value="3">3</option>
					   <option value="4">4</option>
					</select>
				</div>
				<div class="controls controls-row form-inline">		
					<label class="control-label">拜访日期:</label>
					<input  type="text" placeholder="拜访日期" name="visitor_time" id="visitors_time"  value=""  required="true">
				</div>
				<div class="controls controls-row form-inline">
					<label>主机备注</label>
					<textarea name="visitor_remark" rows="5" cols="30" class="input-xlarge" required="true"></textarea>
				</div>
            </div>
            <input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['machine_id']->value;?>
" name="machine_id">
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary machine-visitor-submit">提交更改</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
</form>

<!-- 添加耗材使用记录  -->

<div class="modal fade" id="addconsumablesUsageModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel3" aria-hidden="true" style="margin-top:-358px;">
    <form id="add_consumables_usage_tab" method="post" action="machine_add_consumables.php" class="add_consumables">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title" id="myModalLabel">添加耗材使用记录</h4>
            </div>
            <div class="modal-body">
		         <div class="controls controls-row form-inline">
					<label class="control-label">耗材货号:</label>
					<input  type="text" placeholder="耗材货号" name="consumable_item"  value=""  >
				 </div>
				 <div class="controls controls-row form-inline">
					<label class="control-label">市场价(RMB):</label>
					<input  type="text" placeholder="市场价(RMB)" name="market_value"  value=""  >
				 </div>
				 <div class="controls controls-row form-inline">
					<label class="control-label">成单金额(RMB):</label>
					<input  type="text" placeholder="成单金额(RMB)" name="single_amount"  value=""  >
				 </div>
				 <div class="controls controls-row form-inline">
					<label class="control-label">折扣:</label>
					<input  type="text" placeholder="折扣" name="discount"  value=""  >
				 </div>
				 <div class="controls controls-row form-inline">
					<label class="control-label">开始日期:</label>
					<input  type="text" placeholder="开始日期" name="beg_time" class="beg_time"  value=""  >
				 </div>
				 <div class="controls controls-row form-inline">
					<label class="control-label">使用天数:</label>
					<input  type="text" placeholder="使用天数" name="use_days"  value=""  >
				 </div>
				 <div class="controls controls-row form-inline">
					<label class="control-label">到期日期:</label>
					<input  type="text" placeholder="开始日期" name="end_time" class="end_time"  value=""  >
				 </div>
				<div class="controls controls-row form-inline">
					<label class="control-label">合同号:</label>
					<input  type="text" placeholder="合同号" name="contract_number"  value=""  >
				 </div>
				<div class="controls controls-row form-inline">
					<label>描述</label>
					<textarea name="usage_remark" rows="5" cols="30" class="input-xlarge" required="true"></textarea>
				</div>
            </div>
            <input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['machine_id']->value;?>
" name="machine_id">
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary machine-add-consumables-submit">提交</button>
            </div>
        </div>
    </div>
    </form>
</div>


<!-- 耗材使用备注 -->
<form id="add_machine_consumables_remark_tab" method="post" action="machine_add_consumables_remark.php" class="add-consumables-remark">
<div class="modal fade" id="addconsumablesRemarkModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
   <div class="modal-content">
    <div class="modal-header">
     <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
     <h4 class="modal-title" id="MachineModalLabel">添加耗材使用备注</h4>
    </div>
    <div class="modal-body">
	     <div class="controls controls-row form-inline">
				<label>耗材使用备注</label>
				<textarea name="remark" rows="5" cols="30" class="input-xlarge"></textarea>
		 </div>
    </div>
     <input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['machine_id']->value;?>
" name="machine_id">
    <div class="modal-footer">
     <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>关闭</button>
     <button type="button" class="btn btn-primary consumables-remark-submit">提交</button>
    </div>
   </div>
  </div>
 </div>
</form>

<!-- 配置使用备注 -->
<form id="add_accessories_remark_tab" method="post" action="machine_add_accessories_remark.php" class="add-accessories-remark">
<div class="modal fade" id="addaccessoriesRemarkModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
   <div class="modal-content">
    <div class="modal-header">
     <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
     <h4 class="modal-title" id="MachineModalLabel">添加配件使用备注</h4>
    </div>
    <div class="modal-body">
	     <div class="controls controls-row form-inline">
				<label>配件使用备注</label>
				<textarea name="remark" rows="5" cols="30" class="input-xlarge"></textarea>
		 </div>
    </div>
     <input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['machine_id']->value;?>
" name="machine_id">
    <div class="modal-footer">
     <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>关闭</button>
     <button type="button" class="btn btn-primary accessories-remark-submit">提交</button>
    </div>
   </div>
  </div>
 </div>
</form>

<!-- 添加服务合同记录  -->
<form id="add_contract_tab" method="post" action="machine_add_contract.php" class="add_contract">
<div class="modal fade" id="addContractModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel6" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title" id="myModalLabel">添加服务合同记录</h4>
            </div>
            <div class="modal-body">
		         <div class="controls controls-row form-inline">
					<label class="control-label">服务合同货号:</label>
					<input  type="text" placeholder="服务合同货号" name="service_contract_number"  value=""  >
				 </div>
				 <div class="controls controls-row form-inline">
					<label class="control-label">合同类型:</label>
					<input  type="text" placeholder="合同类型" name="contract_type"  value=""  >
				 </div>
				 <div class="controls controls-row form-inline">
					<label class="control-label">成单金额(RMB):</label>
					<input  type="text" placeholder="成单金额(RMB)" name="single_amount"  value=""  >
				 </div>
				 <div class="controls controls-row form-inline">
					<label class="control-label">合同号:</label>
					<input  type="text" placeholder="合同号" name="contract_number"  value=""  >
				 </div>
				 <div class="controls controls-row form-inline">
					<label class="control-label">开始日期:</label>
					<input  type="text" placeholder="开始日期" name="beg_time" class="beg_time"  value=""  >
				 </div>
				 <div class="controls controls-row form-inline">
					<label class="control-label">到期日期:</label>
					<input  type="text" placeholder="开始日期" name="end_time" class="end_time"  value=""  >
				 </div>
            </div>
            <input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['machine_id']->value;?>
" name="machine_id">
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-primary machine-add-contract-submit">提交</button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
</form>

<!-- 服务合同备注 -->
<form id="add_contract_remark_tab" method="post" action="machine_add_contract_remark.php" class="add-contract-remark">
<div class="modal fade" id="addContractReamrkModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel7">
  <div class="modal-dialog" role="document">
   <div class="modal-content">
    <div class="modal-header">
     <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
     <h4 class="modal-title" id="MachineModalLabel">服务合同备注</h4>
    </div>
    <div class="modal-body">
	     <div class="controls controls-row form-inline">
				<label>服务合同备注</label>
				<textarea name="remark" rows="5" cols="30" class="input-xlarge"></textarea>
		 </div>
    </div>
     <input type="hidden" value="<?php echo $_smarty_tpl->tpl_vars['machine_id']->value;?>
" name="machine_id">
    <div class="modal-footer">
     <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>关闭</button>
     <button type="button" class="btn btn-primary contract-remark-submit">提交</button>
    </div>
   </div>
  </div>
 </div>
</form>
<script>
$(function() {
	var installed_date=$( "#installed_date" );
	installed_date.datepicker({ dateFormat: "yy-mm-dd" });
	installed_date.datepicker( "option", "firstDay", 1 );
	
	var issuance_date=$( "#issuance_date" );
	issuance_date.datepicker({ dateFormat: "yy-mm-dd" });
	issuance_date.datepicker( "option", "firstDay", 1 );
	
	var stop_date=$( "#stop_date" );
	stop_date.datepicker({ dateFormat: "yy-mm-dd" });
	stop_date.datepicker( "option", "firstDay", 1 );
	
	var retirement_date=$( "#retirement_date" );
	retirement_date.datepicker({ dateFormat: "yy-mm-dd" });
	retirement_date.datepicker( "option", "firstDay", 1 );
	
	var update_time=$( "#update_time" );
	update_time.datepicker({ dateFormat: "yy-mm-dd" });
	update_time.datepicker( "option", "firstDay", 1 );
	
	var visitors_time=$( "#visitors_time" );
	visitors_time.datepicker({ dateFormat: "yy-mm-dd" });
	visitors_time.datepicker( "option", "firstDay", 1 );
	
	var beg_time=$( ".beg_time" );
	beg_time.datepicker({ dateFormat: "yy-mm-dd" });
	beg_time.datepicker( "option", "firstDay", 1 );
	
	var end_time=$( ".end_time" );
	end_time.datepicker({ dateFormat: "yy-mm-dd" });
	end_time.datepicker( "option", "firstDay", 1 );
});
addMachineRemark();
submitMachineFrom();
submitMachineVistorFrom();
submitMachineConsumablesFrom();
submitMachineConsumablesRemarkFrom();
submitMachineAccessoriesRemarkFrom();
submitMachineContractFrom();
submitMachineContractRemarkFrom();
</script>	
<!-- END 以下内容不需更改，请保证该TPL页内的标签匹配即可 -->
<?php echo $_smarty_tpl->getSubTemplate ("footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
<?php }} ?>
